import React from "react"
import { Modal, Descriptions, Tag } from "antd"
import { getOdOrderStatus } from "../filter"

function TestModal({ modalProps, formData }) {
  const { orderNo, status, customerName, date } = formData
  return (
    <Modal {...modalProps} footer={null} forceRender>
      <div className="px-30px py-15px box-border">
        <Descriptions>
          <Descriptions.Item span={2} label="订单标号">
            {orderNo}
          </Descriptions.Item>
          <Descriptions.Item label="订单状态">
            <Tag color={getOdOrderStatus(status)?.color}>{getOdOrderStatus(status)?.name}</Tag>{" "}
          </Descriptions.Item>
          <Descriptions.Item span={2} label="学员">
            {customerName}
          </Descriptions.Item>
          <Descriptions.Item label="时间">{date}</Descriptions.Item>
        </Descriptions>
      </div>
    </Modal>
  )
}
export default TestModal
